﻿<UserControl x:Class="Agnes.TaskManager.TaskCalendarView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:dxs="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
             xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
             FontSize="13" FontFamily="SimSun" 
             mc:Ignorable="d" 
             d:DesignHeight="394" d:DesignWidth="575">
    <Grid>
        <dxs:SchedulerControl x:Name="SchedulerControl" ActiveViewType="Month"
                              PopupMenuShowing="SchedulerControl_PopupMenuShowing" 
                              EditAppointmentFormShowing="SchedulerControl_EditAppointmentFormShowing"
                              AllowAppointmentEdit="SchedulerControl_AllowAppointmentEdit"
                              
                              >
            <dxs:SchedulerControl.DefaultMenuCustomizations>
                <dxb:RemoveBarItemAndLinkAction ItemName="NewAppointment"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="NewAllDayEvent"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="NewRecurringAppointment"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="NewRecurringEvent"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="OpenAppointment"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="EditSeries"/>
                <dxb:RemoveBarItemAndLinkAction ItemName="DeleteAppointment"/>
            </dxs:SchedulerControl.DefaultMenuCustomizations>
            <dxs:SchedulerControl.AppointmentMenuCustomizations>
                <dxb:BarButtonItem Name="EditTask" 
                       Content="编辑任务" 
                       dxb:BarItemLinkActionBase.ItemLinkIndex="0"
                       ItemClick="EditTask_ItemClick"/>
            </dxs:SchedulerControl.AppointmentMenuCustomizations>
        
            <dxs:SchedulerControl.Storage>
                <dxs:SchedulerStorage>
                    <dxs:SchedulerStorage.AppointmentStorage>
                        <dxs:AppointmentStorage x:Name="AStorage"
                            Labels="{Binding Model.SchedulerStorage.AppointmentStorage.Labels}"
                            DataSource="{Binding Model.LeafTasks}" >
                            <dxs:AppointmentStorage.Mappings>
                                <dxs:AppointmentMapping Type="AppType"
                                                        Start="StartDT"
                                                        End="EndDT"
                                                        Subject="Subject" 
                                                        Description="Description"
                                                        Label="LabelId"
                                                        AllDay="AllDay"
                                                        Location="Id"
                                                        RecurrenceInfo="RecurrenceInfo"
                                                        ReminderInfo="ReminderInfo" >
                                </dxs:AppointmentMapping>
                            </dxs:AppointmentStorage.Mappings>
                            
                        </dxs:AppointmentStorage>
                    </dxs:SchedulerStorage.AppointmentStorage>
                </dxs:SchedulerStorage>
            </dxs:SchedulerControl.Storage>
        </dxs:SchedulerControl>
    </Grid>
</UserControl>
